var ws = new WebSocket('ws://10.36.140.22:9000');
ws.onopen = ()=>{
    ws.send("大家好！");
}
ws.onmessage = (e)=>{
    let chatroom = document.querySelector('#app-chatroom');
    chatroom.innerHTML += "<br/>" + e.data;
}
ws.onclose = ()=>{
    alert("closed!");
}
ws.onerror = (err)=>{
    alert("error!");
    console.log(err);
}

